package com.seu.dm.controllers;

import com.seu.dm.annotations.permissions.BuyerPermission;
import com.seu.dm.entities.CartProduct;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;


/**
 * Created by Greeting on 2017/2/28.
 */
@Controller
public class CartController {

    /**
     *
     * @param cartProduct
     * @param response
     * @param request
     * @param model
     * @return
     */
    @RequestMapping("/addCart")
    @BuyerPermission
    public String addToCart(CartProduct cartProduct,
                          HttpServletResponse response,
                          HttpServletRequest request, Model model){
        HttpSession session = request.getSession();
       return "";
    }
}
